namespace GameSchoolApplication.Migrations
{
    using System.Data.Entity.Migrations;
    
    public partial class AddStudentAnswerStudentTestPointsId : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("StudentAnswers", "StudentId", "People");
            DropIndex("StudentAnswers", new[] { "StudentId" });
            AddColumn("StudentAnswers", "StudentTestPointsId", c => c.Int(nullable: false));
            AddForeignKey("StudentAnswers", "StudentTestPointsId", "StudentTestPoints", "Id", cascadeDelete: false);
            CreateIndex("StudentAnswers", "StudentTestPointsId");
            DropColumn("StudentAnswers", "StudentId");
        }
        
        public override void Down()
        {
            AddColumn("StudentAnswers", "StudentId", c => c.Int(nullable: false));
            DropIndex("StudentAnswers", new[] { "StudentTestPointsId" });
            DropForeignKey("StudentAnswers", "StudentTestPointsId", "StudentTestPoints");
            DropColumn("StudentAnswers", "StudentTestPointsId");
            CreateIndex("StudentAnswers", "StudentId");
            AddForeignKey("StudentAnswers", "StudentId", "People", "Id", cascadeDelete: true);
        }
    }
}
